Trò chơi Pac-Man

20.584 lượt xem;
1 using UnityEngine;
2 using
System.Collections;
3
4 public
class Point : MonoBehaviour
5 {
6
7     
public float speed;
8
9     
// Use this for initialization
10     
void Start ()
11     {
12         Destroy(gameObject,
1.5f);
13     }
14     
15     
// Update is called once per frame
16     
void Update ()
17     {
18         transform.Translate(
new Vector3(0, speed * Time.deltaTime, 0));
19         speed -=
0.01f;
20     }
21 }


Use this for initialization

Update is called once per frame



Gõ tìm kiếm nhanh...